<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v3.0.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title>用户中心_ECSHOP演示站 - Powered by ECShop</title>
<base href="__STATIC__/home/" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="style.css" rel="stylesheet" type="text/css" />

<body>
{include file='Public/header'}<!-- 引入公共顶部文件 -->
<div class="clear0 "></div>
<div class="block box">
 <div id="ur_here">
  <div class="path"><div>当前位置: <a href=".">首页</a> <code>&gt;</code> 用户中心</div></div>  </div>
</div>
<div class="blank"></div>
<div class="usBox clearfix">
  <div class="usBox_1 f_l">
   <div class="logtitle"></div>
   <form name="formLogin" action="{:url('login_do')}" method="post" onSubmit="return userLogin()">
        <table width="100%" border="0" align="left" cellpadding="3" cellspacing="5">
          <tr>
            <td width="15%" align="right">用户名</td>
            <td width="85%">
              <input type="text" name="username" id="username" size="25" class="inputBg" placeholder="Username"/><br />
              <span id='s_username'></span>
            </td>
          </tr>
          <tr>
            <td align="right">密码</td>
            <td>
              <input type="password" name="password" id="password" size="15" class="inputBg"  placeholder="Password"/><span id='s_password'></span>
            </td>
          </tr>
          <tr>
            <td colspan="2">
            <input type="checkbox" value="1" name="remember" id="remember" />
            <label for="remember">请保存我这次的登录信息。</label></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="left">
            <input type="submit" id="submit" value="" class="us_Submit" />
            </td>
          </tr>
	  <tr><td></td><td><a href="user.php?act=qpassword_name" class="f3">密码问题找回密码</a>&nbsp;&nbsp;&nbsp;<a href="user.php?act=get_password" class="f3">注册邮件找回密码</a></td></tr>
      </table>
    </form>
  </div>
  <div class="usTxt">
    <strong>如果您不是会员，请注册</strong>  <br />
    <strong class="f4">友情提示：</strong><br />
        不注册为会员也可在本店购买商品<br />
            但注册之后您可以：<br />
    1. 保存您的个人资料<br />
    2. 收藏您关注的商品<br />
    3. 享受会员积分制度<br />
    4. 订阅本店商品信息  <br />
    <a href="{:url('Home/Register/register')}"><img src="themes/default/images/bnt_ur_reg.gif" /></a>
  </div>
</div>
<div class="blank"></div>
{include file='Public/footer'}<!-- 引入公共底部文件 -->
</body>
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
    $(document).on('blur','#username',function(){

      var username = $('#username').val();
      if (username=="") 
      {
           $('#s_username').html("<font color='red'>登录名不能为空</font>");
           msg = false;
      }else{
          $('#s_username').html("<font color='green'>√</font>");
          msg = true;
      }
    })

    //验证密码不能为空
    $(document).on('blur','#password',function(){
      var password = $('#password').val();
        if (password=="") 
        {
           $('#s_password').html("<font color='red'>密码不能为空</font>");
           msg1 = false;
        }else{
              $('#s_password').html("<font color='green'>√</font>");
             msg1 = true;
        }
     })

   //接收传来的结果，都是true的时候才能狗提交表单，否则有个是false的就不准提交
    $(document).on('click','#submit',function(){
      if (msg&&msg1) {
        $("#submit").submit();
      }else{
        alert('请正确填写');
        return false;
      }
    })
   
</script>
</html>
